home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 2002 November / SGI IRIX Installation Tools & Overlays 2002 November - Disc 4.iso / dist / license_eoe.idb / etc / init.d / flexlm.z / flexlm
Text File  |  2002-10-15  |  2KB  |  70 lines

  1. #!/bin/sh -f
  2. #
  3. # Start/Stop FLEXlm daemon
  4. #
  5. # Copyright 1988-1991 Silicon Graphics, Inc.
  6. # All rights reserved.
  7. #
  8. # This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  9. # the contents of this file may not be disclosed to third parties, copied or
  10. # duplicated in any form, in whole or in part, without the prior written
  11. # permission of Silicon Graphics, Inc.
  12. #
  13. # RESTRICTED RIGHTS LEGEND:
  14. # Use, duplication or disclosure by the Government is subject to restrictions
  15. # as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  16. # and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  17. # successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  18. # rights reserved under the Copyright Laws of the United States.
  19.  
  20. FLEXLM=/usr/etc
  21. CONFIG=/etc/config
  22. IS_ON=/etc/chkconfig
  23. SU="/bin/su guest -c"
  24. OPTIONS=
  25.  
  26. if $IS_ON verbose ; then
  27.     ECHO=echo
  28.     VERBOSE=-v
  29. else            # For a quiet startup and shutdown
  30.     ECHO=:
  31.     VERBOSE=
  32. fi
  33.  
  34. case "$1" in
  35. 'start')
  36.     if $IS_ON flexlm && test -x $FLEXLM/lmgrd; then
  37.  
  38.         if test -r $CONFIG/lmgrd.options; then
  39.             OPTIONS="`cat $CONFIG/lmgrd.options`"
  40.         fi
  41.  
  42.         $ECHO "FLEXlm Licensing daemon: lmgrd"
  43.  
  44.         #
  45.         # Run as daemon if possible
  46.         #
  47.                 
  48.         if $SU echo >/dev/null 2>&1
  49.         then
  50.             $SU "$FLEXLM/lmgrd $OPTIONS" &
  51.         else
  52.             /sbin/echo "ERROR Cannot run FLEXlm Licensing daemon: lmgrd"
  53.             /sbin/echo " -- guest account does not exist "
  54.         fi
  55.  
  56.     fi
  57.     ;;
  58. 'stop')
  59.     if $IS_ON flexlm && test -x $FLEXLM/lmgrd; then
  60.         if test -r $CONFIG/lmdown.options; then
  61.             OPTIONS="`cat $CONFIG/lmdown.options`"
  62.         fi
  63.         /usr/sbin/lmdown $OPTIONS -q 2>/dev/null 1>/dev/null
  64.     fi
  65.     ;;
  66. *)
  67.     echo "usage: $0 {start|stop}"
  68.     ;;
  69. esac
  70.